1. Field of the Invention
The present invention relates generally to digital telephony, and more particularly to replacing lost packets in a digital voice signal.
2. Related Art
Digital voice is typically coded as a series of numerical values called samples. In Pulse Code Modulation (PCM) coding, these samples represent the amplitude of the speech signal at a given moment in time. Both data networks based on Internet Protocol (IP) and Asynchronous Transfer Mode (ATM) networks store digital voice as collections of samples called packets.
A packet is simply a sequential string of samples attached to a header. The header indicates, among other things, an ordinal number for the packet. FIG. 3 depicts a voice signal that has been digitized and coded as samples which are grouped into three sequential packets 302, 304 and 306. Packets can be any size, but remain a fixed size throughout a transmission. Here, packets would be 4 msec in length for speech sampled at 8 kHz.
Currently, networks that deliver voice, data and video do so by first portioning the information into multiple packets and transmitting them across a network. Each packet may take an entirely different route through the network. At the receiving end of the transmission, the packets must use be reassembled into proper order. For voice applications, packets must be encoded, transmitted, received, and reassembled in real-time. This real-time requirement often means that sophisticated voice coding techniques cannot be performed. Therefore, a need has arisen to develop processes to handle end-to-end voice communications in real-time.
One difficulty with Voice over IP (VoIP) applications is that IP does not guarantee that packets will arrive at the receiving end within any specified period of time, if at all. The receiving end, therefore, must be able to handle the situation where there are lost packets in the signal.
The present invention is an apparatus, method, and computer program product for replacing a lost packet in a sequence of packets, where each packet including samples of a signal, preferably a voice signal.
According to one embodiment, the method includes the steps of generating a fill packet, selecting from a packet that is adjacent to the lost packet a portion that is adjacent to the lost packet, selecting from the fill packet a portion that is adjacent to the adjacent packet, and replacing the selected portion of the fill packet with a weighted average of the selected portion of the fill packet and a reflection of the selected portion of the adjacent packet.
According to another embodiment, the method includes the steps of generating a fill packet, selecting from a packet that is adjacent to the lost packet a portion that is adjacent to the lost packet, selecting from the fill packet a portion that is adjacent to the adjacent packet, and replacing the selected portion of the adjacent packet with a weighted average of the selected portion of the adjacent packet and a reflection of the selected portion of the fill packet.
In either embodiment, the adjacent packet may precede or follow the lost packet, and the weighting may be according to a linear function, a cumulative probability density function, or other types of weighting functions.
One advantage of the present invention is that it replaces lost packets in a voice signal without noticeably degrading sound quality.
One advantage of the present invention is that it is computationally simple.
Further features and advantages of the present invention as well as the structure and operation of various embodiments of the present invention are described in detail below with reference to the accompanying drawings.